FROM java:openjdk-8-jdk-alpine

WORKDIR /usr/local/
RUN apk add --no-cache curl
HEALTHCHECK --interval=5s --timeout=3s --start-period=5m --retries=3 CMD curl -f http://localhost/health || exit 1

ENTRYPOINT exec java $JAVA_OPTS -jar app.jar

COPY ./target/*.jar /usr/local/app.jar